package com.ysd.lis.controller;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.request.BuildResultDataParams;
import com.ysd.lis.service.WkCalcResultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 核算结果 前端控制器
 * </p>
 *
 * @author LiuQi
 * @since 2024-04-24
 */
@RestController
@RequestMapping("/wk/calc/result")
public class WkCalcResultController extends BaseController {


    @Autowired
    WkCalcResultService wkCalcResultService;

    @GetMapping("/getCalcResultList")
    public Result getCalcResultList(@RequestParam(value = "batchId", required = false) String batchId) {
        return wkCalcResultService.getCalcResultList(batchId);
    }

    @PostMapping("/buildData")
    public Result buildData(@RequestBody BuildResultDataParams buildResultDataParams) {
        return wkCalcResultService.buildData(buildResultDataParams);
    }

    @PostMapping("/deleteCalcResult")
    public Result deleteCalcResult(@RequestBody List<String> ids) {
        return wkCalcResultService.deleteCalcResult(ids);
    }
}
